home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / utilitys / 34 / gfabasic / bench.lst < prev    next >
Encoding:
File List  |  1986-10-19  |  1.1 KB  |  79 lines

  1. Alert 1,"Kilobaud Benchmarks",1,"Return",A
  2. Dim M(5)
  3. Print "Benchmark 1 :"'
  4. Print " FOR NEXT LOOP 1 TO 1000 "
  5. T=Timer
  6. For I=1 To 1000
  7. Next I
  8. Print (Timer-T)/200
  9. Print "Benchmark 2 :"'
  10. Print " K=K+1 REPEAT TO 1000"
  11. T=Timer
  12. K=0
  13. Repeat
  14.   K=K+1
  15. Until K>999
  16. Print (Timer-T)/200
  17. Print "Benchmark 3 :"'
  18. Print " K=K+1 AND A=K/K*K+K-K REPEAT TO 1000)"
  19. T=Timer
  20. K=0
  21. Repeat
  22.   K=K+1
  23.   A=K/K*K+K-K
  24. Until K>=1000
  25. Print (Timer-T)/200
  26. Print "Benchmark 4 :"'
  27. Print "K=K+1 And A=K/2*3+4-5"
  28. T=Timer
  29. K=0
  30. Repeat
  31.   K=K+1
  32.   A=K/2*3+4-5
  33. Until K>=1000
  34. Print (Timer-T)/200
  35. Print "Benchmark 5 :"'
  36. T=Timer
  37. K=0
  38. Repeat
  39.   K=K+1
  40.   A=K/2*3+4-5
  41.   Gosub Dummy
  42. Until K>=1000
  43. Print (Timer-T)/200
  44. Print "Benchmark 6 :"'
  45. T=Timer
  46. K=0
  47. Repeat
  48.   K=K+1
  49.   A=K/2*3+4-5
  50.   Gosub Dummy
  51.   For L=1 To 5
  52.   Next L
  53. Until K>=1000
  54. Print (Timer-T)/200
  55. Print "Benchmark 7 :"'
  56. T=Timer
  57. K=0
  58. Repeat
  59.   K=K+1
  60.   A=K/2*3+4-5
  61.   Gosub Dummy
  62.   For L=1 To 5
  63.     M(L)=A
  64.   Next L
  65. Until K>=1000
  66. Print (Timer-T)/200
  67. Print "Benchmark 8 :"'
  68. T=Timer
  69. K=0
  70. Repeat
  71.   K=K+1
  72.   A=K^2
  73.   B=Log(K)
  74.   C=Sin(K)
  75. Until K>=1000
  76. Print (Timer-T)/200
  77. Procedure Dummy
  78. Return
  79.